﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace TakePhotoTogether.Communication.Protocols
{
    class WifiSetupACKData : PayloadData
    {
        public IPAddress IP { get; private set; }

        public WifiSetupACKData(IPAddress ip)
        {
            IP = ip;
        }

        public WifiSetupACKData(byte[] data)
        {
            IP = new IPAddress(data);
        }

        public byte[] ToBytes()
        {
            return IP != null ? IP.GetAddressBytes() : null;
        }

        public override string ToString()
        {
            return IP != null ? IP.ToString() : null;
        }
    }
}
